Agent API Documentation 
Models Retrieval Endpoint
- Method: GET
- Path:
https://api.kadal.ai/aiwb/bot/api/v2/models - Summary: Pull the model details with all required parameters needed to define a Bot.
Description
This endpoint retrieves comprehensive model information required for bot configuration, including provider-specific details and model parameters to balance quality and performance.
Request
- Content-Type: application/json
-
Payload
| Parameter | Description | Data Type | Allowed Values | Required |
|---|---|---|---|---|
| provider | Provider of the model | String | openai, palm | No |
| model_name | Name of the model | String | gpt-4o, gpt-4o-mini | No |
Response
{
"status_code": 200,
"message": "Success: Model details retrieved successfully.",
"data": {
"models": [
{
"provider": "openai",
"model_name": "gpt-4o",
"parameters": {}
}
]
}
}
Usage
import requests
# Define the API endpoint and the payload
url = "https://api.kadal.ai/aiwb/bot/api/v2/models"
token = "your_token_here"
headers = {
"Authorization": f"Bearer {token}"
}
params = {
"provider": "openai",
"model_name": "gpt-4o"
}
# Make the GET request
response = requests.get(url, headers=headers, params=params)
# Print the response
if response.status_code == 200:
print("Response Data:", response.json())
else:
print("Failed to call the API. Status Code:", response.status_code)
print("Response Text:", response.text)
Chat Bot Creation Endpoint
- Method: POST
- Path:
https://api.kadal.ai/aiwb/bot/api/v3 - Summary: Create and configure customized chatbots with comprehensive options.
Description
This endpoint enables users to create and configure customized chatbots with comprehensive options. Users can specify model details (OpenAI/Palm), context, temperature, token limits, and other generation parameters. The API supports four bot types ('Custom', 'Super Agent', 'Orchestrator', 'External') with knowledge from content folders/objects, guidelines, and examples.
Request
- Content-Type: application/json
-
Payload
| Parameter | Description | Data Type | Allowed Values | Required |
|---|---|---|---|---|
| chatbotName | Name of the chatbot | String | Yes | |
| chatbotDescription | Description of the chatbot | String | No | |
| folder_ids | Linked folder IDs | Array | Array of strings (UUIDs) | No |
| object_ids | Linked object IDs | Array | Array of strings (UUIDs) | No |
| guideline_object_ids | Linked guideline object IDs | Array | Array of strings (UUIDs) | No |
| template_object_id | Linked template object IDs | Array | Array of strings (UUIDs) | No |
| modelId | Model provider/identifier | String | Azure, gpt-4o, gpt-4o-mini, etc. | Yes |
| modelVersion | Model version | String | gpt-4o-mini, latest, etc. | Yes |
| context | Bot context/instructions | String | No | |
| temperature | Model temperature | Number | 0.0-1.0 | No |
| max_tokens | Maximum token limit | Integer | No | |
| top_p | Nucleus sampling probability | Number | 0.0-1.0 | No |
| top_k | Top-k sampling | Integer | No | |
| frequency_penalty | Frequency penalty | Number | 0.0-2.0 | No |
| presence_penalty | Presence penalty | Number | 0.0-2.0 | No |
| best_of | Number of completions to generate | Integer | No | |
| guard_rail | Guardrail settings | Array | No | |
| examples | Example prompts | Array | No | |
| embed_profiles | Embedding profiles | Array | No | |
| category | Category | String | No | |
| bot_icon | Bot icon URL or data | String | No | |
| tool_config | Tool configuration | Object | { content_lake, web_search, image_generation } | No |
| tool_settings | Tool settings | Object | { image_generation: { ... } } | No |
| opening_line_for_conversation | Opening line for conversation | String | No | |
| token_usage | Token usage tracking | Object | Nested object | No |
| type | Bot type | String | Custom, Super Agent, Orchestrator, External | No |
| is_default | Is default bot | Boolean | true, false | No |
| conversation_id | Conversation ID | String | No | |
| chatbot_memory | Chatbot memory settings | Object | { if_short_term: bool, if_long_term: bool } | No |
| allow_duplication | Allow Duplication | Boolean | true, false | No |
Response
{
"status_code": 201,
"message": "Bot Created Successfully",
"chat_bot_id": "5869c849-5555-4c7b-ba79-d7404fc7f1a7" // chat_bot_id of created agent
}
Usage
import requests
# Define the API endpoint and the payload
url = "https://api.kadal.ai/aiwb/bot/api/v3"
token = "your_token_here"
headers = {
"Authorization": f"Bearer {token}"
}
data = {
"chatbotName": "My Custom Bot",
"modelId": "gpt-4o",
"modelVersion": "latest",
"context": "You are a helpful assistant.",
"temperature": 0.7,
"maxTokens": 2000,
"botType": "Custom"
}
# Make the POST request
response = requests.post(url, headers=headers, json=data)
# Print the response
if response.status_code == 200:
print("Response Data:", response.json())
else:
print("Failed to call the API. Status Code:", response.status_code)
print("Response Text:", response.text)
Chat Bots Listing Endpoint
- Method: POST
- Path:
https://api.kadal.ai/aiwb/bot/api/v3/List/ - Summary: Retrieve a list of available chat bots with filtering and pagination.
Description
This endpoint provides functionality to retrieve a list of available chat bots. The API supports filtering, pagination, and sorting of chat bots. The API also supports grouping of bots by created_by field.
Request
- Content-Type: application/json
-
Payload
| Parameter | Description | Data Type | Allowed Values | Required |
|---|---|---|---|---|
| page_no | Page number to retrieve | Integer | No | |
| page_size | Number of items per page | Integer | No | |
| order | Sort order by creation time | String | asc, desc | No |
| is_published | Filter by published status | Boolean | true, false | No |
| group_by | Field to group by | String | created_by | No |
Response
{
"status_code": 200,
"message": "Success: Chat bots retrieved successfully.",
"total_bot_count": 10,
"chat_bots": []
}
Usage
import requests
# Define the API endpoint and the payload
url = "https://api.kadal.ai/aiwb/bot/api/v3/List/"
token = "your_token_here"
headers = {
"Authorization": f"Bearer {token}"
}
data = {
"page_no": 1,
"page_size": 10,
"order": "asc",
"is_published": True,
"group_by": "created_by"
}
# Make the POST request
response = requests.post(url, headers=headers, json=data)
# Print the response
if response.status_code == 200:
print("Response Data:", response.json())
else:
print("Failed to call the API. Status Code:", response.status_code)
print("Response Text:", response.text)
Chat Bot Retrieval Endpoint
- Method: GET
- Path:
https://api.kadal.ai/aiwb/bot/api/v3/{chatbot_id} - Summary: Retrieve a specific chatbot by its ID.
Description
This endpoint allows users to retrieve details of a specific chatbot using its unique identifier.
Request
- Content-Type: application/json
-
Payload
| Parameter | Description | Data Type | Allowed Values | Required |
|---|---|---|---|---|
| chatbot_id | Unique chatbot identifier | String | Yes (Path) |
Response
{
"status_code": 200,
"chat_bot_id": "5869c849-5555-4c7b-ba79-d7404fc7f1a7",
"data": [
{
"_id": "694a46d8f42bc8526fce4575",
"chatbot_global_id": "5869c849-5555-4c7b-ba79-d7404fc7f1a7",
"chatbot_version_id": "e18cbde4-e820-4223-bfb3-9475fb78fe13",
"created_by_name": "System",
"updated_by": "System",
"created_by_ID": "System",
"tenant_id": "8cfc8013-eb69-44ff-8dde-34b7699b3f37",
"is_latest": true,
"is_active": true,
"creation_time": "2025-12-23T07:38:00.181000",
"update_time": "2025-12-23T07:39:48.318000",
"is_ready": null,
"is_published": false,
"metadata": {
"modelId": "Azure",
"folder_ids": "",
"object_ids": "",
"guideline_object_ids": "",
"template_object_id": "",
"modelVersion": "gpt-4o",
"chatbotName": "Image_Bot_2312",
"chatbotDescription": "A bot that helps answer questions",
"context": "You are a helpful assistant",
"temperature": 0.5,
"max_tokens": 4096,
"top_p": 0.95,
"top_k": 1,
"best_of": 1,
"algorithm": 1,
"frequency_penalty": 0.5,
"presence_penalty": 0.5,
"creator_role": "",
"category": "",
"bot_icon": "",
"tool_config": {
"content_lake": true,
"web_search": false,
"image_generation": true
},
"tool_settings": {
"image_generation": {
"model_provider": "VertexAI",
"model_version": "imagen-4.0-fast-generate-001",
"aspect_ratio": "AUTO",
"num_images": 1
}
}
},
"chatbot_guardrails": [],
"chatbot_examples": [],
"embed_profiles": [],
"is_deleted": false,
"type": "External",
"opening_line_for_conversation": "",
"token_usage": {
"additionalProp1": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"additionalProp2": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"additionalProp3": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
}
},
"is_default": false,
"conversation_id": "",
"chatbot_memory": {
"if_short_term": false,
"if_long_term": false
}
}
]
}
Usage
import requests
# Define the API endpoint and the payload
url = "https://api.kadal.ai/aiwb/bot/api/v3/{chatbot_id}"
token = "your_token_here"
chatbot_id = "your_chatbot_id"
headers = {
"Authorization": f"Bearer {token}"
}
# Make the GET request
response = requests.get(url.format(chatbot_id=chatbot_id), headers=headers)
# Print the response
if response.status_code == 200:
print("Response Data:", response.json())
else:
print("Failed to call the API. Status Code:", response.status_code)
print("Response Text:", response.text)
Chat Bot Update Endpoint
- Method: PUT
- Path:
https://api.kadal.ai/aiwb/bot/api/v3/{chatbot_id} - Summary: Update an existing chatbot configuration.
Description
This endpoint allows users to update the configuration of an existing chatbot by providing the chatbot ID and updated parameters.
Request
- Content-Type: application/json
-
Payload
| Parameter | Description | Data Type | Allowed Values | Required |
|---|---|---|---|---|
| chatbot_id | Unique chatbot identifier | String | Yes (Path) | |
| chatbotName | Updated name of the chatbot | String | No | |
| chatbotDescription | Description of the chatbot | String | No | |
| folder_ids | Linked folder IDs | Array | Array of strings (UUIDs) | No |
| object_ids | Linked object IDs | Array | Array of strings (UUIDs) | No |
| guideline_object_ids | Linked guideline object IDs | Array | Array of strings (UUIDs) | No |
| template_object_id | Linked template object IDs | Array | Array of strings (UUIDs) | No |
| modelId | Model provider/identifier | String | Azure, gpt-4o, gpt-4o-mini, etc. | No |
| modelVersion | Model version | String | gpt-4o-mini, latest, etc. | No |
| context | Bot context/instructions | String | No | |
| temperature | Model temperature | Number | 0.0-1.0 | No |
| max_tokens | Maximum token limit | Integer | No | |
| top_p | Nucleus sampling probability | Number | 0.0-1.0 | No |
| top_k | Top-k sampling | Integer | No | |
| frequency_penalty | Frequency penalty | Number | 0.0-2.0 | No |
| presence_penalty | Presence penalty | Number | 0.0-2.0 | No |
| best_of | Number of completions to generate | Integer | No | |
| guard_rail | Guardrail settings | Array | No | |
| embed_profiles | Embedding profiles | Array | No | |
| examples | Example prompts (Q&A) | Array | Array of objects: {question, answer} | No |
| category | Category | String | No | |
| bot_icon | Bot icon URL or data | String | No | |
| conversation_id | Conversation ID | String | No | |
| opening_line_for_conversation | Opening line for conversation | String | No | |
| tool_config | Tool configuration | Object | { additionalProp1, additionalProp2, ... } | No |
| tool_settings | Tool settings | Object | { image_generation: { ... } } | No |
| chatbot_memory | Chatbot memory settings | Object | { if_short_term: bool, if_long_term: bool } | No |
| allow_duplication | Allow Duplication | Boolean | true, false | No |
Response
{
"status_code": 200,
"message": "Success: Chat bot updated successfully.",
"data": {}
}
Usage
import requests
# Define the API endpoint and the payload
url = "https://api.kadal.ai/aiwb/bot/api/v3/{chatbot_id}"
token = "your_token_here"
chatbot_id = "your_chatbot_id"
headers = {
"Authorization": f"Bearer {token}"
}
data = {
"chatbotName": "Updated Bot Name",
"context": "Updated context for the bot",
"temperature": 0.8
}
# Make the PUT request
response = requests.put(url.format(chatbot_id=chatbot_id), headers=headers, json=data)
# Print the response
if response.status_code == 200:
print("Response Data:", response.json())
else:
print("Failed to call the API. Status Code:", response.status_code)
print("Response Text:", response.text)
Chat Bot Deletion Endpoint
- Method: DELETE
- Path:
https://api.kadal.ai/aiwb/bot/api/v3/{chatbot_id} - Summary: Delete a specific chatbot by its ID.
Description
This endpoint allows users to permanently delete a chatbot using its unique identifier.
Request
- Content-Type: application/json
-
Payload
| Parameter | Description | Data Type | Allowed Values | Required |
|---|---|---|---|---|
| chatbot_id | Unique chatbot identifier | String | Yes (Path) |
Response
{
"status_code": 200,
"message": "Success: Chat bot deleted successfully.",
"data": {}
}
Usage
import requests
# Define the API endpoint and the payload
url = "https://api.kadal.ai/aiwb/bot/api/v3/{chatbot_id}"
token = "your_token_here"
chatbot_id = "your_chatbot_id"
headers = {
"Authorization": f"Bearer {token}"
}
# Make the DELETE request
response = requests.delete(url.format(chatbot_id=chatbot_id), headers=headers)
# Print the response
if response.status_code == 200:
print("Response Data:", response.json())
else:
print("Failed to call the API. Status Code:", response.status_code)
print("Response Text:", response.text)
Chat Bot Publish Endpoint
- Method: POST
- Path:
https://api.kadal.ai/aiwb/bot/api/v3/publish/{chatbot_id} - Summary: Publish a chatbot to make it available for public use.
Description
This endpoint allows users to publish a chatbot, making it available for public access and deployment.
Request
- Content-Type: application/json
-
Payload
| Parameter | Description | Data Type | Allowed Values | Required |
|---|---|---|---|---|
| chatbot_id | Unique chatbot identifier | String | Yes (Path) |
Response
{
"status_code": 200,
"message": "Success: Chat bot published successfully.",
"data": {}
}
Usage
import requests
# Define the API endpoint and the payload
url = "https://api.kadal.ai/aiwb/bot/api/v3/publish/{chatbot_id}"
token = "your_token_here"
chatbot_id = "your_chatbot_id"
headers = {
"Authorization": f"Bearer {token}"
}
# Make the POST request
response = requests.post(url.format(chatbot_id=chatbot_id), headers=headers)
# Print the response
if response.status_code == 200:
print("Response Data:", response.json())
else:
print("Failed to call the API. Status Code:", response.status_code)
print("Response Text:", response.text)
Chat Bot Unpublish Endpoint
- Method: POST
- Path:
https://api.kadal.ai/aiwb/bot/api/v3/unpublish/{chatbot_id} - Summary: Unpublish a chatbot to remove it from public access.
Description
This endpoint allows users to unpublish a chatbot, removing it from public access while keeping it available for editing.
Request
- Content-Type: application/json
-
Payload
| Parameter | Description | Data Type | Allowed Values | Required |
|---|---|---|---|---|
| chatbot_id | Unique chatbot identifier | String | Yes (Path) |